﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MyOA.BLL;
using MyOA.Model;
namespace MyOA.UI
{
    public partial class Head : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["loginId"]!=null)
                {
                    string loginId = (string)Session["loginId"];

                    lblLoginId.Text = loginId;

                    if (Session["loginRoleInfo"]!=null)
                    {
                        lblRoleName.Text = ((RoleInfo)Session["loginRoleInfo"]).RoleName;
                    }

                }
                else
                {
                    Response.Redirect("Login.aspx");
                }
            }
        }

        protected void imgbtnCancel_Click(object sender, ImageClickEventArgs e)
        {
            Session.Remove("loginId");
            RegisterStartupScript("", "<script>parent.window.location.href='Login.aspx'</script>");
        }

       
    }
}
